<template>
    <td :class="{'td-title':title}" :colspan="colspan" :rowspan="rowspan">
        <template v-if="title">
            <slot>
                {{title}}：
            </slot>
        </template>
        <template v-else>
            <slot>
                {{content}}
            </slot>
        </template>
    </td>
</template>

<script>
export default {
    name: "WTabTd",
    props: ['content','title','colspan','rowspan'],
}
</script>

<style scoped>
.td{

}
/*标题单元格样式*/
.td-title{
    background: #8080804d;
    width: 170px;
    text-indent: 10px;
}
td{
    border: 1px solid gray;
    text-indent: 10px;
}
</style>